package com.rockwell.maze800.model;

public class DistanceBandwidthAlgorithm {
	public final static int ActionZoneLowerBoundary = 5;
	public final static int ActionZoneUpperBoundary = 10;
	public final static int OpeningBoundary = 15;
	
	public DistanceBandwidth perform(double distance) {
		if (distance < ActionZoneLowerBoundary) {
			return DistanceBandwidth.HITTING_ZONE;
		}
		else if (distance >= ActionZoneLowerBoundary && distance < ActionZoneUpperBoundary) {
			return DistanceBandwidth.ACTION_ZONE;
		}
		else if (distance >= ActionZoneUpperBoundary && distance < OpeningBoundary) {
			return DistanceBandwidth.OUT_OF_ACTION_ZONE;
		}
		else {
			return DistanceBandwidth.OPENING_ZONE;
		}
	}
}
